﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类cCheck
	/// </summary>
	[Serializable]
	public class cCheck : Entity 
	{ 
		 public cCheck() 
            : base("cCheck") 
        { 

        }


		#region Model
		private int _UID;
		private string _Bank;
		private string _CheckNo;
		private int? _CheckStatus;
		private int? _CheckType;
		private string _DeptCode;
		private string _PurchaseDate;
		private string _Amount;
		private string _AmountOfBank;
		private bool? _IsAllocate;
		private string _AllocateDate;
		private int? _UserAllocateID;
		private bool? _IsMove;
		private int? _UserMoveID;
		private string _MoveDate;
		private bool? _IsConfirm;
		private int? _UserConfirmID;
		private string _ConfirmDate;
		private string _Note;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Bank
		{
			get{ return _Bank; }
			set
			{
				this.OnPropertyValueChange(_.Bank,_Bank,value);
				this._Bank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CheckNo
		{
			get{ return _CheckNo; }
			set
			{
				this.OnPropertyValueChange(_.CheckNo,_CheckNo,value);
				this._CheckNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CheckStatus
		{
			get{ return _CheckStatus; }
			set
			{
				this.OnPropertyValueChange(_.CheckStatus,_CheckStatus,value);
				this._CheckStatus = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CheckType
		{
			get{ return _CheckType; }
			set
			{
				this.OnPropertyValueChange(_.CheckType,_CheckType,value);
				this._CheckType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptCode
		{
			get{ return _DeptCode; }
			set
			{
				this.OnPropertyValueChange(_.DeptCode,_DeptCode,value);
				this._DeptCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string PurchaseDate
		{
			get{ return _PurchaseDate; }
			set
			{
				this.OnPropertyValueChange(_.PurchaseDate,_PurchaseDate,value);
				this._PurchaseDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Amount
		{
			get{ return _Amount; }
			set
			{
				this.OnPropertyValueChange(_.Amount,_Amount,value);
				this._Amount = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AmountOfBank
		{
			get{ return _AmountOfBank; }
			set
			{
				this.OnPropertyValueChange(_.AmountOfBank,_AmountOfBank,value);
				this._AmountOfBank = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsAllocate
		{
			get{ return _IsAllocate; }
			set
			{
				this.OnPropertyValueChange(_.IsAllocate,_IsAllocate,value);
				this._IsAllocate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AllocateDate
		{
			get{ return _AllocateDate; }
			set
			{
				this.OnPropertyValueChange(_.AllocateDate,_AllocateDate,value);
				this._AllocateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserAllocateID
		{
			get{ return _UserAllocateID; }
			set
			{
				this.OnPropertyValueChange(_.UserAllocateID,_UserAllocateID,value);
				this._UserAllocateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsMove
		{
			get{ return _IsMove; }
			set
			{
				this.OnPropertyValueChange(_.IsMove,_IsMove,value);
				this._IsMove = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserMoveID
		{
			get{ return _UserMoveID; }
			set
			{
				this.OnPropertyValueChange(_.UserMoveID,_UserMoveID,value);
				this._UserMoveID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MoveDate
		{
			get{ return _MoveDate; }
			set
			{
				this.OnPropertyValueChange(_.MoveDate,_MoveDate,value);
				this._MoveDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsConfirm
		{
			get{ return _IsConfirm; }
			set
			{
				this.OnPropertyValueChange(_.IsConfirm,_IsConfirm,value);
				this._IsConfirm = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserConfirmID
		{
			get{ return _UserConfirmID; }
			set
			{
				this.OnPropertyValueChange(_.UserConfirmID,_UserConfirmID,value);
				this._UserConfirmID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ConfirmDate
		{
			get{ return _ConfirmDate; }
			set
			{
				this.OnPropertyValueChange(_.ConfirmDate,_ConfirmDate,value);
				this._ConfirmDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.Bank,
				_.CheckNo,
				_.CheckStatus,
				_.CheckType,
				_.DeptCode,
				_.PurchaseDate,
				_.Amount,
				_.AmountOfBank,
				_.IsAllocate,
				_.AllocateDate,
				_.UserAllocateID,
				_.IsMove,
				_.UserMoveID,
				_.MoveDate,
				_.IsConfirm,
				_.UserConfirmID,
				_.ConfirmDate,
				_.Note,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_Bank,
				_CheckNo,
				_CheckStatus,
				_CheckType,
				_DeptCode,
				_PurchaseDate,
				_Amount,
				_AmountOfBank,
				_IsAllocate,
				_AllocateDate,
				_UserAllocateID,
				_IsMove,
				_UserMoveID,
				_MoveDate,
				_IsConfirm,
				_UserConfirmID,
				_ConfirmDate,
				_Note,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "Bank":
                    this._Bank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CheckNo":
                    this._CheckNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CheckStatus":
                    this._CheckStatus = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CheckType":
                    this._CheckType = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "DeptCode":
                    this._DeptCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "PurchaseDate":
                    this._PurchaseDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Amount":
                    this._Amount = DataHelper.ConvertValue<string>(value);
                    break; 
				case "AmountOfBank":
                    this._AmountOfBank = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsAllocate":
                    this._IsAllocate = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "AllocateDate":
                    this._AllocateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserAllocateID":
                    this._UserAllocateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsMove":
                    this._IsMove = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserMoveID":
                    this._UserMoveID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "MoveDate":
                    this._MoveDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsConfirm":
                    this._IsConfirm = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserConfirmID":
                    this._UserConfirmID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ConfirmDate":
                    this._ConfirmDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "Bank":
                    return this._Bank; 
				case "CheckNo":
                    return this._CheckNo; 
				case "CheckStatus":
                    return this._CheckStatus; 
				case "CheckType":
                    return this._CheckType; 
				case "DeptCode":
                    return this._DeptCode; 
				case "PurchaseDate":
                    return this._PurchaseDate; 
				case "Amount":
                    return this._Amount; 
				case "AmountOfBank":
                    return this._AmountOfBank; 
				case "IsAllocate":
                    return this._IsAllocate; 
				case "AllocateDate":
                    return this._AllocateDate; 
				case "UserAllocateID":
                    return this._UserAllocateID; 
				case "IsMove":
                    return this._IsMove; 
				case "UserMoveID":
                    return this._UserMoveID; 
				case "MoveDate":
                    return this._MoveDate; 
				case "IsConfirm":
                    return this._IsConfirm; 
				case "UserConfirmID":
                    return this._UserConfirmID; 
				case "ConfirmDate":
                    return this._ConfirmDate; 
				case "Note":
                    return this._Note; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","cCheck");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","cCheck","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Bank = new Field("Bank","cCheck","Bank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckNo = new Field("CheckNo","cCheck","CheckNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckStatus = new Field("CheckStatus","cCheck","CheckStatus");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckType = new Field("CheckType","cCheck","CheckType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptCode = new Field("DeptCode","cCheck","DeptCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PurchaseDate = new Field("PurchaseDate","cCheck","PurchaseDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Amount = new Field("Amount","cCheck","Amount");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AmountOfBank = new Field("AmountOfBank","cCheck","AmountOfBank");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsAllocate = new Field("IsAllocate","cCheck","IsAllocate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AllocateDate = new Field("AllocateDate","cCheck","AllocateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserAllocateID = new Field("UserAllocateID","cCheck","UserAllocateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsMove = new Field("IsMove","cCheck","IsMove");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserMoveID = new Field("UserMoveID","cCheck","UserMoveID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MoveDate = new Field("MoveDate","cCheck","MoveDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsConfirm = new Field("IsConfirm","cCheck","IsConfirm");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserConfirmID = new Field("UserConfirmID","cCheck","UserConfirmID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ConfirmDate = new Field("ConfirmDate","cCheck","ConfirmDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","cCheck","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","cCheck","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","cCheck","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","cCheck","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","cCheck","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","cCheck","ModifyDate");
		}
		#endregion

 
	}
}

